#!/bin/sh

search="blog.tar.gz"
bashPath=`pwd`

while true
do
sleep 2s
    for file in `cd .. && ls`
    do
        if [ $file = $search ]
        then
            rm -rf ./
            sleep 1s
            cd ..
            tar -zxvf $search
            rm -rf $search
            cd $bashPath
        fi
    done
done